<!DOCTYPE HTML>
<body>
Test for crbug.com/370136: event targets should not be nodes in the shadow tree.<br>
FAIL
<template id="template">
    <svg width="100" height="100">
        <rect id="FAIL" width="100" height="100" fill="green" />
    </svg>
</template>
<div id="host"></div>
<script>
    var host = document.querySelector('#host');
    var shadowRoot = host.attachShadow({mode: 'open'});
    var template = document.querySelector('template');
    shadowRoot.appendChild(template.content.cloneNode(true));
    host.addEventListener('click', function(e) {
        if (e.target.id == 'host')
            document.body.innerHTML = 'PASS';
    });

    if (window.eventSender) {
        eventSender.mouseMoveTo(100, 100);
        eventSender.mouseDown();
        eventSender.mouseUp();
    }
</script>
</body>